package com.dhcc.bpm.modules.cost.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.modules.cost.entity.CostRecord;
import com.dhcc.bpm.modules.cost.vo.ApiCostVO;
import com.dhcc.bpm.modules.cost.vo.AppCostVO;
import com.dhcc.bpm.modules.cost.vo.CostGatewayLogVO;
import com.dhcc.bpm.modules.cost.vo.CostRecordVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName CostRecordMapper.class
 * @Description  消费记录表 Mapper 接口
 * @Author xiaFaYu
 * @Date 2019-12-16 14:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
public interface CostRecordMapper extends BaseMapper<CostRecord> {

	/**
	 * @Description 自定义分页
	 * @Author xiafayu
	 * @Date 2020/2/24 15:06
	 * @param page
	 * @param costRecord
	 * @return java.util.List<com.dhcc.bpm.modules.cost.vo.CostRecordVO>
	 **/
	List<CostRecordVO> selectCostRecordPage(IPage page, CostRecordVO costRecord);

	/**
	 * @Description 自定义分页
	 * @Author xiafayu
	 * @Date 2020/2/24 15:06
	 * @param page
	 * @param apiCostVO
	 * @return java.util.List<com.dhcc.bpm.modules.cost.vo.CostRecordVO>
	 **/
	List<ApiCostVO> selectApiCostRecordPage(IPage page, ApiCostVO apiCostVO);

	/**
	 * @Description 自定义分页
	 * @Author xiafayu
	 * @Date 2020/2/24 15:06
	 * @param page
	 * @param appCostVO
	 * @return java.util.List<com.dhcc.bpm.modules.cost.vo.CostRecordVO>
	 **/
	List<AppCostVO> selectAppCostRecordPage(IPage page, AppCostVO appCostVO);


	/**
	 * @Description 根据apiCode查询响应时间成功率
	 * @Author xiafayu
	 * @Date 2020/11/3 16:23
	 * @param apiCode
	 * @return com.dhcc.bpm.modules.cost.vo.CostGatewayLogVO
	 * @throws
	 **/
	CostGatewayLogVO getApiCostByApiCode(@Param("apiCode") String apiCode, @Param("startDate") String startDate, @Param("endDate") String endDate);

	/**
	 * @Description 根据apiCode查询响应时间成功率
	 * @Author xiafayu
	 * @Date 2020/11/3 16:23
	 * @param appCode
	 * @return com.dhcc.bpm.modules.cost.vo.CostGatewayLogVO
	 * @throws
	 **/
	CostGatewayLogVO getApiCostByAppCode(@Param("appCode") String appCode, @Param("startDate") String startDate, @Param("endDate") String endDate);

	List<CostRecord> find(CostRecord opcCostRecord);

}
